package com.example.fragmentyeni;

import android.app.Activity;
import android.app.FragmentManager;
import android.content.Intent;
import android.os.Bundle;
import android.text.style.SuperscriptSpan;

public class AnotherActivity extends Activity {

	FragmentB f2;
	FragmentManager manager;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.another_layout);
		
		Intent intent = getIntent();
		int index= intent.getIntExtra("index", 0);
		manager = getFragmentManager();
		f2 = (FragmentB) manager.findFragmentById(R.id.fragment2);
		if(f2!=null)
			f2.changeData(index);
		
		
	}
}
